import request from '@/utils/request'
import { renderUrl } from '../utils'

const headers = {
  'Content-Type': 'application/json'
}

export function add (data) {
  return request({
    url: '/admin/productAttributer/add',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function edit (data) {
  return request({
    url: '/admin/productAttributer/update',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function del (data) {
  return request({
    url: '/admin/productAttributer/delete',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function productAttributeList (data) {
  return request({
    url: '/admin/productAttributer/list',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function getAttrDetail (data) {
  return request({
    url: '/admin/productAttdetails/list',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export default { add, edit, del }
